<el-main>
    <el-row>
        <el-button type="primary" size="small" :disabled="isModify"
                   @click="editAccess">修改
        </el-button>
            <el-button :disabled="isModify" type="primary" size="small"
                       @click="editCk">仓库修改
            </el-button>
    </el-row>
    <el-row :gutter="10" type="flex">
        <el-form ref="form" :model="form" :rules="rules" label-width="100px">
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="正式单日期">
                    <el-date-picker
                            type="date"
                            v-model="form.GWCSDOCDATE"
                            @change="changeGwcsdocdate"
                            value-format="yyyy-MM-dd"
                            style="width: 100%" :disabled="isEnable">
                    </el-date-picker>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="订单编号" prop="GWCSDOCNO">
                    <el-input v-model="form.GWCSDOCNO" readOnly></el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="操作人员">
                    <el-input  v-model="form.GWCS014" readonly clearable @clear="clearGwcs014">
                        <i class="el-icon-search el-input__icon" @click="openUser" slot="suffix"></i>
                    </el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="操作人员名称">
                    <el-input v-model="form.GWCS014_NAME" readonly></el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="经销商" prop="GWCS010">
                    <el-input v-model="form.GWCS010" readOnly clearable @clear="clearGwcs010">
                        <i class="el-icon-search el-input__icon" @click="openKh" slot="suffix"></i>
                    </el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="经销商名称">
                    <el-input v-model="form.GWAKL003" readonly></el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="最终客户">
                    <el-input v-model="form.GWCS114">
                        <!--<i class="el-icon-search el-input__icon" @click="openJxs" slot="suffix"></i>-->
                    </el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="订单类型" prop="GWCS117">
                    <el-select v-model="form.GWCS117" :disabled="isEnable" clearable>
                        <el-option v-for="item in selectGwcs117Options" :label="item.value"
                                   :value="item.code" :disabled="item.disabled"></el-option>
                    </el-select>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="归属法人">
                    <el-input v-model="form.GWCSMLEGAL_NAME" readonly clearable @clear="clearGwcsmlegal">
                        <i class="el-icon-search el-input__icon" @click="open" slot="suffix"></i>
                    </el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="ERP营运中心">
                    <el-input v-model="form.GWCSPLANT" readonly></el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8" hidden>
                <el-form-item label="币种">
                    <el-input v-model="form.GWCS006"></el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8" hidden>
                <el-form-item label="汇率">
                    <el-input v-model="form.GWCS034"></el-input>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="预计交货日期">
                    <el-date-picker
                            type="date"
                            v-model="form.GWCS016"
                            value-format="yyyy-MM-dd"
                            style="width: 100%" @change="change">
                    </el-date-picker>
                </el-form-item>
            </el-col>
            <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                <el-form-item label="拆包否" prop="GWCS118">
                    <el-select v-model="form.GWCS118" :disabled="isChange" clearable>
                        <el-option v-for="item in selectGwcs118Options" :label="item.code" :value="item.value"></el-option>
                    </el-select>
                </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                <el-form-item label="备注">
                    <el-input type="textarea" v-model="form.GWCS050"></el-input>
                </el-form-item>
            </el-col>
        </el-form>
    </el-row>
    <el-row>
        <div class="pos-re">
            <div class="pos-ab" style="margin-bottom: 10px;">
                <el-button type="primary" size="small" :disabled="isCheck"
                           @click="addData">添加
                </el-button>
                <el-button type="primary" size="small" :disabled="isCheck"
                           @click="del">删除
                </el-button>
                <el-button type="primary" size="small" :disabled="giftButton"
                           @click="giftInfo">赠品信息
                </el-button>
                <!--<el-button type="primary" size="small"
                           @click="addGwcq">购物车转入
                </el-button>
                <el-button type="primary" size="small"
                           @click="check" v-show="isCheck">审核
                </el-button>
                <el-button type="primary" size="small"
                           @click="uncheck" v-show="isCheck">取消审核
                </el-button>-->
            </div>
            <div class="table-responsive">
                <table id="gwai710_edit_table"
                       class="layui-table"
                       lay-size="sm"
                       lay-filter="gwai710_edit_table">
                </table>
            </div>
        </div>
    </el-row>
    <el-row>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="text-align: right;margin-top: 10px;">
            <el-button icon="icon iconfont icon-23" size="mini" @click="cancle">关闭</el-button>
            <el-button type="warning" icon="icon iconfont icon-21" size="mini" :disabled="isCheck" @click="saveData">保存
            </el-button>
        </el-col>
    </el-row>
</el-main>
<script>
    require(["pc/crm/gwai710_edit"], $.noop);
</script>
